#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <gtk/gtk.h>
#include "mainwindow.h"
#include "newinfo.h"
#include "addgroup.h"


int main (int argc, char *argv[])
{
  GtkWidget *window_main;

#ifdef ENABLE_NLS
  bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);
#endif

  gtk_set_locale ();
  gtk_init (&argc, &argv);

  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
  add_pixmap_directory ("../pixmaps");
  add_pixmap_directory("./pixmaps");
  /*
   * The following code was added by Glade to create one of each component
   * (except popup menus), just so that you see something after building
   * the project. Delete any components that you don't want shown initially.
   */

   create_easyblog_folder(&global_file);
   #ifdef _DEBUG_
   	printf("main:here we have create easyblog folder successful\n");
   #endif
   read_config_file(&global_file);
   #ifdef _DEBUG_
   	printf("main:here we have read easyblog folder successful\n");
   #endif
   window_main = create_window_main (&global_file,&clist);
   gtk_widget_show (window_main);
   #ifdef _DEBUG_
   	printf("main:here we have create main window successful\n");
   #endif
   init_newinfo_struct(&newinfo);
   init_addgroup_struct(&addgroup);
   show_all_group(&global_file,&clist);
   read_data_file_to_show(global_file.data,&global_file,&clist);
  #ifdef _DEBUG_
   	printf("main:here we have read default data file successful\n");
   #endif
   create_tmp_file(&global_file);
  gtk_main ();
  return 0;
}

